feat: Allow setting OriginID when sending a message#227
feat: Allow setting OriginID when sending a message#227selfhoster1312 wants to merge 1 commit intoxmppo:masterfrom
Conversation
|
Maybe related? https://xmpp.org/extensions/xep-0359.html |
|
IIRC go-xmpp creates UUIDv7 IDs as those are unique but sortable which is to prefer according to community common sense. If we let the user set arbitrary IDs we might end up with a mishmash. I don't know why it was chosen to return the bytes written and if anyone is using this. I think in general it would make sense to return xmpp.Chat as there might also be other stuff generated in the future that might not be of interest today. |
|
I made a POC commit for the Send() function there: 1089118 |
Not sure what you have in mind, but allowing post-processing introspection is indeed a good thing. Especially since i believe go-xmpp doesn't debug log outgoing messages. The Send POC looks great! My PR wanted minimal breaking change, but like you said, it actually makes sense to break the existing API in this case :-) Slightly off-topic on the topic of send: am i wrong to assume that writing to stanzaWriter such as in |
In matterbridge-org/matterbridge#134 's current form it's necessary to work with the |
I don't think this is the case. dino definitely sets origin-id (there's even old issues from 2018 about that feature on their github). And if a client doesn't set origin-id, it just cannot support message replies. message To my knowledge, the only reason to use the ID in a client request is more or less to follow
Please do, as it seems to be the way the go-xmpp maintainer has chosen :) |
@mattn What do you think? |
Following some discussion in #226, i also believe it makes sense to allow the client to define the origin-id sent by go-xmpp in order to keep track of replies.
I'm not sure if setting id/origin-id to the same thing is the way you want to go. Suggestions welcome.